package ru.niir.goodfil.audit.domain;

import ru.niir.goodfil.audit.domain.enums.Crud;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

/**
 * Операции с пользователем
 */
@Entity
public class UserUIEvent extends Event {
    @Enumerated(EnumType.STRING)
    private Crud crud;

    @Column(length = 10)
    private String userId;

    @Column(length = 20)
    private String userLogin;

    @Column(length = 200)
    private String name;

    @Column(length = 50)
    private String role;

    @Column(length = 50)
    private String mail;

    @Column(length = 20)
    private String tabNumber;

    @Column(length = 20)
    private String creationDate;

    public Crud getCrud() {
        return crud;
    }

    public void setCrud(Crud crud) {
        this.crud = crud;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserLogin() {
        return userLogin;
    }

    public void setUserLogin(String userLogin) {
        this.userLogin = userLogin;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public String getTabNumber() {
        return tabNumber;
    }

    public void setTabNumber(String tabNumber) {
        this.tabNumber = tabNumber;
    }

    public String getCreationDate() {
        return creationDate;
    }

    public void setCreationDate(String creationDate) {
        this.creationDate = creationDate;
    }

    @Override
    public String toString() {
        return "UserUIEvent{" +
                "crud=" + crud +
                ", userId='" + userId + '\'' +
                ", userLogin='" + userLogin + '\'' +
                ", name='" + name + '\'' +
                ", role='" + role + '\'' +
                ", mail='" + mail + '\'' +
                ", tabNumber='" + tabNumber + '\'' +
                ", creationDate='" + creationDate + '\'' +
                '}';
    }
}
